import React, { Component } from 'react';
import { Breadcrumb } from 'antd';
import './TabTitle.less';

class TabTitle extends Component {
  render() {
    return (
      <div className="tab-title">
        <Breadcrumb>
          {
            this.props.breadCrumb instanceof Array && this.props.breadCrumb.length !== 0 ?
            this.props.breadCrumb.map((item, index) => {
              return (
                <Breadcrumb.Item key={index}>{item}</Breadcrumb.Item>
              )
            })
            :
            null
          }
        </Breadcrumb>
        <p className={`tab-title-title ${this.props.showTabbar ? '' : 'pb10'}`}>{this.props.title}</p>
      </div>
    )
  }
}

export default TabTitle;
